{namespace dkpoints.raid.templates}

/**
 * Generic error statement + Back button
 */
{template .uploadNew}
<div id="upload_form">
  <div id="import_details">
    <h2 id="import_header">Upload a new raid</h2>
    Please enter raid details by either:
    <ul>
      <li>Copy & paste the XML string output from Headcount (or compatible add-on).</li>
      <li>Enter a list of raid members, one name per line.</li>
  </div>
          
  <form name="formImport" id="formImport">
      <textarea id="ImportXML" rows="15" cols="100">
{literal}<raid generatedFrom="HeadCount" version="1.7.1">
    <zone>Icecrown Citadel</zone>
    <difficulty>25 Player</difficulty>
    <start>2010-01-06T04:45:29Z</start>
    <end>2010-01-06T04:57:11Z</end>
    <players>
        <player>
            <name>Amaraz</name>
            <class>Paladin</class>
            <guild>Da Kine</guild>
            <race>BloodElf</race>
            <sex>Male</sex>
            <level>80</level>
            <raidDuration>702</raidDuration>
            <waitDuration>0</waitDuration>
            <offlineDuration>0</offlineDuration>
            <waitlist>
                <status>False</status>
                <start />
                <note />
            </waitlist>
            <attendance>
                <event>
                    <note>Raid list</note>
                    <start>2010-01-06T04:45:29Z</start>
                    <end>2010-01-06T04:57:11Z</end>
                </event>
            </attendance>
        </player>
        <player>
            <name>Athan</name>
            <class>Priest</class>
            <guild>Da Kine</guild>
            <race>BloodElf</race>
            <sex>Male</sex>
            <level>80</level>
            <raidDuration>702</raidDuration>
            <waitDuration>0</waitDuration>
            <offlineDuration>0</offlineDuration>
            <waitlist>
                <status>False</status>
                <start />
                <note />
            </waitlist>
            <attendance>
                <event>
                    <note>Raid list</note>
                    <start>2010-01-06T04:45:29Z</start>
                    <end>2010-01-06T04:57:11Z</end>
                </event>
            </attendance>
        </player>
        <player>
            <name>Catostrophic</name>
            <class>Mage</class>
            <guild>Da Kine</guild>
            <race>Scourge</race>
            <sex>Female</sex>
            <level>80</level>
            <raidDuration>702</raidDuration>
            <waitDuration>0</waitDuration>
            <offlineDuration>0</offlineDuration>
            <waitlist>
                <status>False</status>
                <start />
                <note />
            </waitlist>
            <attendance>
                <event>
                    <note>Raid list</note>
                    <start>2010-01-06T04:45:29Z</start>
                    <end>2010-01-06T04:57:11Z</end>
                </event>
            </attendance>
        </player>
        <player>
            <name>Cobi</name>
            <class>Death Knight</class>
            <guild>Da Kine</guild>
            <race>Orc</race>
            <sex>Male</sex>
            <level>80</level>
            <raidDuration>702</raidDuration>
            <waitDuration>0</waitDuration>
            <offlineDuration>0</offlineDuration>
            <waitlist>
                <status>False</status>
                <start />
                <note />
            </waitlist>
            <attendance>
                <event>
                    <note>Raid list</note>
                    <start>2010-01-06T04:45:29Z</start>
                    <end>2010-01-06T04:57:11Z</end>
                </event>
            </attendance>
        </player>
        <player>
            <name>Darkbyte</name>
            <class>Rogue</class>
            <guild>Da Kine</guild>
            <race>Scourge</race>
            <sex>Male</sex>
            <level>80</level>
            <raidDuration>702</raidDuration>
            <waitDuration>0</waitDuration>
            <offlineDuration>0</offlineDuration>
            <waitlist>
                <status>False</status>
                <start />
                <note />
            </waitlist>
            <attendance>
                <event>
                    <note>Raid list</note>
                    <start>2010-01-06T04:45:29Z</start>
                    <end>2010-01-06T04:57:11Z</end>
                </event>
            </attendance>
        </player>
        <player>
            <name>Detrimental</name>
            <class>Paladin</class>
            <guild>Da Kine</guild>
            <race>BloodElf</race>
            <sex>Female</sex>
            <level>80</level>
            <raidDuration>702</raidDuration>
            <waitDuration>0</waitDuration>
            <offlineDuration>0</offlineDuration>
            <waitlist>
                <status>False</status>
                <start />
                <note />
            </waitlist>
            <attendance>
                <event>
                    <note>Raid list</note>
                    <start>2010-01-06T04:45:29Z</start>
                    <end>2010-01-06T04:57:11Z</end>
                </event>
            </attendance>
        </player>
        <player>
            <name>Drakengard</name>
            <class>Hunter</class>
            <guild>Da Kine</guild>
            <race>Orc</race>
            <sex>Male</sex>
            <level>80</level>
            <raidDuration>702</raidDuration>
            <waitDuration>0</waitDuration>
            <offlineDuration>0</offlineDuration>
            <waitlist>
                <status>False</status>
                <start />
                <note />
            </waitlist>
            <attendance>
                <event>
                    <note>Raid list</note>
                    <start>2010-01-06T04:45:29Z</start>
                    <end>2010-01-06T04:57:11Z</end>
                </event>
            </attendance>
        </player>
        <player>
            <name>Dridarok</name>
            <class>Warrior</class>
            <guild>Da Kine</guild>
            <race>Orc</race>
            <sex>Male</sex>
            <level>80</level>
            <raidDuration>702</raidDuration>
            <waitDuration>0</waitDuration>
            <offlineDuration>0</offlineDuration>
            <waitlist>
                <status>False</status>
                <start />
                <note />
            </waitlist>
            <attendance>
                <event>
                    <note>Raid list</note>
                    <start>2010-01-06T04:45:29Z</start>
                    <end>2010-01-06T04:57:11Z</end>
                </event>
            </attendance>
        </player>
        <player>
            <name>Epsilonzero</name>
            <class>Paladin</class>
            <guild>Da Kine</guild>
            <race>BloodElf</race>
            <sex>Male</sex>
            <level>80</level>
            <raidDuration>702</raidDuration>
            <waitDuration>0</waitDuration>
            <offlineDuration>0</offlineDuration>
            <waitlist>
                <status>False</status>
                <start />
                <note />
            </waitlist>
            <attendance>
                <event>
                    <note>Raid list</note>
                    <start>2010-01-06T04:45:29Z</start>
                    <end>2010-01-06T04:57:11Z</end>
                </event>
            </attendance>
        </player>
        <player>
            <name>Kusaruh</name>
            <class>Death Knight</class>
            <guild>Da Kine</guild>
            <race>Orc</race>
            <sex>Male</sex>
            <level>80</level>
            <raidDuration>702</raidDuration>
            <waitDuration>0</waitDuration>
            <offlineDuration>0</offlineDuration>
            <waitlist>
                <status>False</status>
                <start />
                <note />
            </waitlist>
            <attendance>
                <event>
                    <note>Raid list</note>
                    <start>2010-01-06T04:45:29Z</start>
                    <end>2010-01-06T04:57:11Z</end>
                </event>
            </attendance>
        </player>
        <player>
            <name>Leilei</name>
            <class>Priest</class>
            <guild>Da Kine</guild>
            <race>Troll</race>
            <sex>Female</sex>
            <level>80</level>
            <raidDuration>702</raidDuration>
            <waitDuration>0</waitDuration>
            <offlineDuration>0</offlineDuration>
            <waitlist>
                <status>False</status>
                <start />
                <note />
            </waitlist>
            <attendance>
                <event>
                    <note>Raid list</note>
                    <start>2010-01-06T04:45:29Z</start>
                    <end>2010-01-06T04:57:11Z</end>
                </event>
            </attendance>
        </player>
        <player>
            <name>Leoban</name>
            <class>Mage</class>
            <guild>Da Kine</guild>
            <race>BloodElf</race>
            <sex>Female</sex>
            <level>80</level>
            <raidDuration>702</raidDuration>
            <waitDuration>0</waitDuration>
            <offlineDuration>0</offlineDuration>
            <waitlist>
                <status>False</status>
                <start />
                <note />
            </waitlist>
            <attendance>
                <event>
                    <note>Raid list</note>
                    <start>2010-01-06T04:45:29Z</start>
                    <end>2010-01-06T04:57:11Z</end>
                </event>
            </attendance>
        </player>
        <player>
            <name>Leshrac</name>
            <class>Warlock</class>
            <guild>Da Kine</guild>
            <race>Orc</race>
            <sex>Male</sex>
            <level>80</level>
            <raidDuration>702</raidDuration>
            <waitDuration>0</waitDuration>
            <offlineDuration>0</offlineDuration>
            <waitlist>
                <status>False</status>
                <start />
                <note />
            </waitlist>
            <attendance>
                <event>
                    <note>Raid list</note>
                    <start>2010-01-06T04:45:29Z</start>
                    <end>2010-01-06T04:57:11Z</end>
                </event>
            </attendance>
        </player>
        <player>
            <name>Monarran</name>
            <class>Druid</class>
            <guild>Da Kine</guild>
            <race>Tauren</race>
            <sex>Male</sex>
            <level>80</level>
            <raidDuration>702</raidDuration>
            <waitDuration>0</waitDuration>
            <offlineDuration>0</offlineDuration>
            <waitlist>
                <status>False</status>
                <start />
                <note />
            </waitlist>
            <attendance>
                <event>
                    <note>Raid list</note>
                    <start>2010-01-06T04:45:29Z</start>
                    <end>2010-01-06T04:57:11Z</end>
                </event>
            </attendance>
        </player>
        <player>
            <name>Narcis</name>
            <class>Mage</class>
            <guild>Da Kine</guild>
            <race>Scourge</race>
            <sex>Female</sex>
            <level>80</level>
            <raidDuration>702</raidDuration>
            <waitDuration>0</waitDuration>
            <offlineDuration>0</offlineDuration>
            <waitlist>
                <status>False</status>
                <start />
                <note />
            </waitlist>
            <attendance>
                <event>
                    <note>Raid list</note>
                    <start>2010-01-06T04:45:29Z</start>
                    <end>2010-01-06T04:57:11Z</end>
                </event>
            </attendance>
        </player>
        <player>
            <name>Nokokoo</name>
            <class>Druid</class>
            <guild>Da Kine</guild>
            <race>Tauren</race>
            <sex>Female</sex>
            <level>80</level>
            <raidDuration>702</raidDuration>
            <waitDuration>0</waitDuration>
            <offlineDuration>0</offlineDuration>
            <waitlist>
                <status>False</status>
                <start />
                <note />
            </waitlist>
            <attendance>
                <event>
                    <note>Raid list</note>
                    <start>2010-01-06T04:45:29Z</start>
                    <end>2010-01-06T04:57:11Z</end>
                </event>
            </attendance>
        </player>
        <player>
            <name>Nostra</name>
            <class>Warlock</class>
            <guild>Da Kine</guild>
            <race>Orc</race>
            <sex>Male</sex>
            <level>80</level>
            <raidDuration>702</raidDuration>
            <waitDuration>0</waitDuration>
            <offlineDuration>0</offlineDuration>
            <waitlist>
                <status>False</status>
                <start />
                <note />
            </waitlist>
            <attendance>
                <event>
                    <note>Raid list</note>
                    <start>2010-01-06T04:45:29Z</start>
                    <end>2010-01-06T04:57:11Z</end>
                </event>
            </attendance>
        </player>
        <player>
            <name>Russ</name>
            <class>Rogue</class>
            <guild>Da Kine</guild>
            <race>Scourge</race>
            <sex>Male</sex>
            <level>80</level>
            <raidDuration>702</raidDuration>
            <waitDuration>0</waitDuration>
            <offlineDuration>0</offlineDuration>
            <waitlist>
                <status>False</status>
                <start />
                <note />
            </waitlist>
            <attendance>
                <event>
                    <note>Raid list</note>
                    <start>2010-01-06T04:45:29Z</start>
                    <end>2010-01-06T04:57:11Z</end>
                </event>
            </attendance>
        </player>
        <player>
            <name>Ryoushi</name>
            <class>Hunter</class>
            <guild>Da Kine</guild>
            <race>Troll</race>
            <sex>Male</sex>
            <level>80</level>
            <raidDuration>702</raidDuration>
            <waitDuration>0</waitDuration>
            <offlineDuration>0</offlineDuration>
            <waitlist>
                <status>False</status>
                <start />
                <note />
            </waitlist>
            <attendance>
                <event>
                    <note>Raid list</note>
                    <start>2010-01-06T04:45:29Z</start>
                    <end>2010-01-06T04:57:11Z</end>
                </event>
            </attendance>
        </player>
        <player>
            <name>Shkarn</name>
            <class>Shaman</class>
            <guild>Da Kine</guild>
            <race>Orc</race>
            <sex>Male</sex>
            <level>80</level>
            <raidDuration>702</raidDuration>
            <waitDuration>0</waitDuration>
            <offlineDuration>0</offlineDuration>
            <waitlist>
                <status>False</status>
                <start />
                <note />
            </waitlist>
            <attendance>
                <event>
                    <note>Raid list</note>
                    <start>2010-01-06T04:45:29Z</start>
                    <end>2010-01-06T04:57:11Z</end>
                </event>
            </attendance>
        </player>
        <player>
            <name>Structure</name>
            <class>Warrior</class>
            <guild>Da Kine</guild>
            <race>Tauren</race>
            <sex>Male</sex>
            <level>80</level>
            <raidDuration>702</raidDuration>
            <waitDuration>0</waitDuration>
            <offlineDuration>0</offlineDuration>
            <waitlist>
                <status>False</status>
                <start />
                <note />
            </waitlist>
            <attendance>
                <event>
                    <note>Raid list</note>
                    <start>2010-01-06T04:45:29Z</start>
                    <end>2010-01-06T04:57:11Z</end>
                </event>
            </attendance>
        </player>
        <player>
            <name>Therenus</name>
            <class>Death Knight</class>
            <guild>Da Kine</guild>
            <race>BloodElf</race>
            <sex>Male</sex>
            <level>80</level>
            <raidDuration>702</raidDuration>
            <waitDuration>0</waitDuration>
            <offlineDuration>0</offlineDuration>
            <waitlist>
                <status>False</status>
                <start />
                <note />
            </waitlist>
            <attendance>
                <event>
                    <note>Raid list</note>
                    <start>2010-01-06T04:45:29Z</start>
                    <end>2010-01-06T04:57:11Z</end>
                </event>
            </attendance>
        </player>
        <player>
            <name>Zarasch</name>
            <class>Death Knight</class>
            <guild>Da Kine</guild>
            <race>BloodElf</race>
            <sex>Male</sex>
            <level>80</level>
            <raidDuration>702</raidDuration>
            <waitDuration>0</waitDuration>
            <offlineDuration>0</offlineDuration>
            <waitlist>
                <status>False</status>
                <start />
                <note />
            </waitlist>
            <attendance>
                <event>
                    <note>Raid list</note>
                    <start>2010-01-06T04:45:29Z</start>
                    <end>2010-01-06T04:57:11Z</end>
                </event>
            </attendance>
        </player>
        <player>
            <name>Zeezle</name>
            <class>Shaman</class>
            <guild>Da Kine</guild>
            <race>Troll</race>
            <sex>Female</sex>
            <level>80</level>
            <raidDuration>702</raidDuration>
            <waitDuration>0</waitDuration>
            <offlineDuration>0</offlineDuration>
            <waitlist>
                <status>False</status>
                <start />
                <note />
            </waitlist>
            <attendance>
                <event>
                    <note>Raid list</note>
                    <start>2010-01-06T04:45:29Z</start>
                    <end>2010-01-06T04:57:11Z</end>
                </event>
            </attendance>
        </player>
    </players>
    <bossKills>
        <boss>
            <name>Deathbringer Saurfang</name>
            <zone>Icecrown Citadel</zone>
            <difficulty>25 Player</difficulty>
            <time>2010-01-06T04:55:18Z</time>
            <players>
                <player>Amaraz</player>
                <player>Athan</player>
                <player>Catostrophic</player>
                <player>Cobi</player>
                <player>Darkbyte</player>
                <player>Detrimental</player>
                <player>Drakengard</player>
                <player>Dridarok</player>
                <player>Epsilonzero</player>
                <player>Kusaruh</player>
                <player>Leilei</player>
                <player>Leoban</player>
                <player>Leshrac</player>
                <player>Monarran</player>
                <player>Narcis</player>
                <player>Nokokoo</player>
                <player>Nostra</player>
                <player>Russ</player>
                <player>Ryoushi</player>
                <player>Shkarn</player>
                <player>Structure</player>
                <player>Therenus</player>
                <player>Zarasch</player>
                <player>Zeezle</player>
            </players>
        </boss>
    </bossKills>
    <loot>
        <item>
            <id>49908</id>
            <name>Primordial Saronite</name>
            <looter>Russ</looter>
            <source>Trash mob</source>
            <time>2010-01-06T04:55:59Z</time>
            <zone>Icecrown Citadel</zone>
            <quantity>1</quantity>
            <cost>0</cost>
            <note />
            <rarity>3</rarity>
            <level>80</level>
            <type>Trade Goods</type>
            <subType>Other</subType>
            <texture>Interface\Icons\spell_fire_felflamebreath</texture>
        </item>
        <item>
            <id>50362</id>
            <name>Deathbringer&apos;s Will</name>
            <looter>Zarasch</looter>
            <source>Trash mob</source>
            <time>2010-01-06T04:56:22Z</time>
            <zone>Icecrown Citadel</zone>
            <quantity>1</quantity>
            <cost>0</cost>
            <note />
            <rarity>4</rarity>
            <level>264</level>
            <type>Armor</type>
            <subType>Miscellaneous</subType>
            <texture>Interface\Icons\inv_jewelry_trinket_04</texture>
        </item>
        <item>
            <id>52026</id>
            <name>Protector&apos;s Mark of Sanctification</name>
            <looter>Zeezle</looter>
            <source>Trash mob</source>
            <time>2010-01-06T04:56:52Z</time>
            <zone>Icecrown Citadel</zone>
            <quantity>1</quantity>
            <cost>0</cost>
            <note />
            <rarity>4</rarity>
            <level>80</level>
            <type>Miscellaneous</type>
            <subType>Junk</subType>
            <texture>Interface\Icons\ability_paladin_shieldofthetemplar</texture>
        </item>
        <item>
            <id>52027</id>
            <name>Conqueror&apos;s Mark of Sanctification</name>
            <looter>Leshrac</looter>
            <source>Trash mob</source>
            <time>2010-01-06T04:57:07Z</time>
            <zone>Icecrown Citadel</zone>
            <quantity>1</quantity>
            <cost>0</cost>
            <note />
            <rarity>4</rarity>
            <level>80</level>
            <type>Miscellaneous</type>
            <subType>Junk</subType>
            <texture>Interface\Icons\ability_paladin_shieldofthetemplar</texture>
        </item>
    </loot>
</raid>{/literal}
    </textarea><br />
    <button type="button" id="btnImport" name="import">Parse Raid String</button>
  </form>
</div>
{/template}

/**
 * Generate the verification form for displaying the raid.
 * @param editable Whether or not to show editing controls and set inputs as readonly
 * @param offerEdit If viewing in read-only mode, should we offer the Edit button?
 */
{template .verifyForm}
<div id="verify_form">
  <form id="formVerify">
    <div id="RaidInfo">
      <div id="RaidDate"><div class="infoLabel">Date:</div><input type="text" name="raidDate" id="raidDateField" size="30" {if not $editable}readonly{/if} /></div>
      <div id="RaidZone"><div class="infoLabel">Zone:</div><input type="text" name="raidZone" id="raidZoneField" size="30" {if not $editable}readonly{/if} />  {if $editable}<button id="upload" type="button" name="upload" value="Upload Raid">Upload Raid</button>{/if}{if $offerEdit}<button id="upload" type="button" name="edit" value="Edit Raid">Edit Raid</button>{/if}</div>
      <div id="RaidName"><div class="infoLabel">Raid Name:</div><input type="text" name="raidName" id="raidNameField" size="30" {if not $editable}readonly{/if} /></div>
    </div>
    
    <!-- Script will populate this with names of raid members -->
    <div id="RaidMembersWrapper"><h3>Raid Members</h3><div id="RaidMembers"></div><div id="raidMemberOptions"><div>Click player names to inspect</div>{if $editable}<div>Drag player names to "Looted By" fields</div>{/if}</div></div>
    
    <!-- Script will populate this with loot items and recipients -->
    <div id="LootListWrapper"><h3>Raid Loot</h3><div id="LootList"></div></div>
    
    <!-- Canvas for selecting new gear based on AJAX queries -->
    <div id="ItemChoiceWrapper"><div id="ItemChoice"></div></div>
  </form>
</div>
{/template}

/**
 * Generate a raid member div.
 * @param playerName The player object.
 * @param playerClass The player's class.
 * @param number The player's position in the list.
 * @param editable Show or don't show controls
 */
{template .newRaider}
<div class="NameWrapper">
  <div class="playername {$playerClass}">{$number}. <a href="/#/raider/{$playerName}/" {if $editable}target="_blank"{/if} class="playerlink"><span id="{$playerName}Lbl" class="dragshadow {$playerClass}">{$playerName}</span></a></div>
  <div class="listoptions">{if $editable}<button id="{$playerName}Rmv" type="button" class="btnRemovePlayer"> - </button>{/if}</div>
</div>
{/template}

/**
 * Generate the Add Player fields
 */
{template .addRaider}
<div class="NameWrapper">
  <div class="playername"><input id="NewPlayer" /></div>
  <div class="listoptions"><button id="AddPlayer" type="button" class="btnRemovePlayer"> + </button></div>
</div>
{/template}

/**
 * Generate a loot div.
 * @param wowheadLink The link to the item's Wowhead page
 * @param index Which piece of loot is this?
 * @param lootIcon The url to the image's icon (taken from the Armory)
 * @param itemQuality String denoting item's quality (epic, superior, etc)
 * @param lootName The item's string name.
 * @param interest Onspec | Offspec | Banked | Disenchanted
 * @param tierList An array of tier items.
 * @param instanceTier Array index for this instance's tier.
 * @param slot The slot this belongs to.
 * @param editable Show or don't show controls.
 * @param playerName The name of the player who looted the item
 * @param playerClass The class of hte player who looted the item
 */
{template .newLoot}
<div class="loot">
  <hr width="100%" />
  <div class="lootIconDiv" id="lootDiv{$index}"><a href="{$wowheadLink}" target="_blank"><img class="lootIcon" src="{$lootIcon}" /></a></div>
  <div class="lootInput"><div>Item Name:</div><input class="{$itemQuality}" type="input" name="lootName{$index}" id="lootName{$index}" value="{$lootName}" size="30" readonly /></div>
  <div class="tierslot">
    <div>Tier / Slot:</div>
    <select name="lootTierSelect{$index}" id="lootTierSelect{$index}" size="1" class="tierSelect" {if not $editable}readonly{/if}>
      <option value="Choose">Choose...</option>
      {foreach $tier in $tierList}<option value="{$tier}" {if $instanceTier == $tier}selected{/if}>{$tier}</option>{/foreach}
      <option value="Other">Other</option>
    </select>
    <input id="lootTierInput{$index}" class="tierInput" type="text" name="lootTierInput{$index}" {if not $editable}readonly{/if} />
    <select id="slotSelect{$index}" class="slotSelect" name="slotSelect{$index}" size="1">
      <option value="">Select one...</option>
      <option></option>
      <optgroup label="Armor">
        <option {if $slot == 'Head'}selected{/if}>Head</option>
        <option {if $slot == 'Neck'}selected{/if}>Neck</option>
        <option {if $slot == 'Shoulders'}selected{/if}>Shoulders</option>
        <option {if $slot == 'Back'}selected{/if}>Back</option>
        <option {if $slot == 'Chest'}selected{/if}>Chest</option>
        <option {if $slot == 'Wrist'}selected{/if}>Wrist</option>
        <option {if $slot == 'Hand'}selected{/if}>Hand</option>
        <option {if $slot == 'Waist'}selected{/if}>Waist</option>
        <option {if $slot == 'Legs'}selected{/if}>Legs</option>
        <option {if $slot == 'Feet'}selected{/if}>Feet</option>
        <option {if $slot == 'Finger'}selected{/if}>Finger</option>
        <option {if $slot == 'Trinket'}selected{/if}>Trinket</option>
      </optgroup>
      <option></option>
      <optgroup label="Weapons">
        <option {if $slot == 'One Handed Weapon'}selected{/if}>One Handed Weapon</option>
        <option {if $slot == 'Two Handed Weapon'}selected{/if}>Two Handed Weapon</option>
        <option {if $slot == 'Off-hand Frill/Shield'}selected{/if}>Off-hand Frill/Shield</option>
      </optgroup>
      <option></option>
      <optgroup label="Miscellaneous">
        <option {if $slot == 'Legendary Thing'}selected{/if}>Legendary Thing</option>
        <option {if $slot == 'Trade Good'}selected{/if}>Trade Good</option>
        <option {if $slot == 'Quest Item'}selected{/if}>Quest Item</option>
      </optgroup>
    </select>
  </div>
  <div class="lootedBy" {if ($interest == 'Banked') or ($interest == 'Disenchanted')}style="visibility: hidden;"{/if}>
    <div>Looted by:</div>
    <input id="looter{$index}" class="{$playerClass}" type="input" name="looter{$index}" value="{$playerName}" size="15" {if not $editable}readonly{/if} />
  </div>
  <div class="lootInterest">
    <input id="lootOnspec{$index}" type="radio" name="lootOnspec{$index}" value="Onspec" {if $interest == 'Onspec'}checked="checked"{/if} {if not $editable}readonly{/if} /> On-spec
    <input id="lootOffspec{$index}" type="radio" name="lootOnspec{$index}" value="Offspec" {if $interest == 'Offspec'}checked="checked"{/if} {if not $editable}readonly{/if} /> Off-spec
    <input id="lootBanked{$index}" type="radio" name="lootOnspec{$index}" value="Banked" {if $interest == 'Banked'}checked="checked"{/if} {if not $editable}readonly{/if} /> Banked
    <input id="lootDEed{$index}" type="radio" name="lootOnspec{$index}" value="Disenchanted" {if $interest == 'Disenchanted'}checked="checked"{/if} {if not $editable}readonly{/if} /> Disenchanted
    {if $editable}<button id="lootRemove{$index}" class="lootButton" type="button" name="lootRemove{$index}" value="Remove">Remove</button>{/if}
  </div>
</div>
{/template}

/**
 * Get the innerHTML for the tier select dropdowns.
 * @param tierList An array of tier names.
 * @param instanceTier The index for this instance's tier in the tier list.
 */
{template .buildTierSelect}
<option value="Choose">Choose...</option>
{foreach $tier in $tierList}
<option value="{$tier}" {if $instanceTier == $tier}selected{/if}>{$tier}</option>
{/foreach}
<option value="Other">Other</option>
{/template}

/**
 * Generate the Add Loot panel for the loot list
 */
{template .addLootPanel}
<div id="addLoot" class="loot lootAdd">
  <hr width="100%" />
  <div class="lootInput">
   <div>Item Name:</div>
   <input id="addLootName" type="input" name="addLootName" value="Item Name || Item # || Penalty" size="30" />
   <button id="addLootBtn" class="lootButton" type="button" name="addLootBtn" value="Add">Add/Search</button>
  </div>
</div>
<hr id="lastHR" width="100%" />
{/template}
